package com.tuanzi.blog.web;

import com.tuanzi.blog.service.BlogService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;

/**
 * 雄关漫道真如铁，而今迈过从头越
 **/

@Controller
public class FooterController {

    @Resource
    private BlogService blogService;

    @GetMapping("/footer")
    public String footer(Model model){
        //加载一些无聊的信息
        model.addAttribute("total",blogService.countBlog());
        return "footer :: newblogList";
    }

}
